function App() {
    const isBlack = false;
    const Black = () => <div>black</div>;
    const White = () => <div>white</div>;
    return <div>
        {isBlack ? <Black /> : <White />}
    </div>;
}

ReactDOM.createRoot(document.querySelector('#root')).render(
    <App />
);